Integrand size = 23, antiderivative size = 147 \[ \int \frac {\tan ^6(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=-\frac {x}{a^3}+\frac {\sqrt {a+b} \left (3 a^2-4 a b+8 b^2\right ) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{8 a^3 b^{5/2} f}-\frac {(a+b) \tan ^3(e+f x)}{4 a b f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac {(3 a-4 b) (a+b) \tan (e+f x)}{8 a^2 b^2 f \left (a+b+b \tan ^2(e+f x)\right )} \]
-x/a^3+1/8*(3*a^2-4*a*b+8*b^2)*arctan(b^(1/2)*tan(f*x+e)/(a+b)^(1/2))*(a+b )^(1/2)/a^3/b^(5/2)/f-1/4*(a+b)*tan(f*x+e)^3/a/b/f/(a+b+b*tan(f*x+e)^2)^2- 1/8*(3*a-4*b)*(a+b)*tan(f*x+e)/a^2/b^2/f/(a+b+b*tan(f*x+e)^2)
Result contains complex when optimal does not.
Time = 7.61 (sec) , antiderivative size = 760, normalized size of antiderivative = 5.17 \[ \int \frac {\tan ^6(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\frac {\left (-3 a^3+a^2 b-4 a b^2-8 b^3\right ) (a+2 b+a \cos (2 e+2 f x))^3 \sec ^6(e+f x) \left (\frac {\arctan \left (\sec (f x) \left (\frac {\cos (2 e)}{2 \sqrt {a+b} \sqrt {b \cos (4 e)-i b \sin (4 e)}}-\frac {i \sin (2 e)}{2 \sqrt {a+b} \sqrt {b \cos (4 e)-i b \sin (4 e)}}\right ) (-a \sin (f x)-2 b \sin (f x)+a \sin (2 e+f x))\right ) \cos (2 e)}{64 a^3 b^2 \sqrt {a+b} f \sqrt {b \cos (4 e)-i b \sin (4 e)}}-\frac {i \arctan \left (\sec (f x) \left (\frac {\cos (2 e)}{2 \sqrt {a+b} \sqrt {b \cos (4 e)-i b \sin (4 e)}}-\frac {i \sin (2 e)}{2 \sqrt {a+b} \sqrt {b \cos (4 e)-i b \sin (4 e)}}\right ) (-a \sin (f x)-2 b \sin (f x)+a \sin (2 e+f x))\right ) \sin (2 e)}{64 a^3 b^2 \sqrt {a+b} f \sqrt {b \cos (4 e)-i b \sin (4 e)}}\right )}{\left (a+b \sec ^2(e+f x)\right )^3}+\frac {(a+2 b+a \cos (2 e+2 f x)) \sec (2 e) \sec ^6(e+f x) \left (-24 a^2 b^2 f x \cos (2 e)-64 a b^3 f x \cos (2 e)-64 b^4 f x \cos (2 e)-16 a^2 b^2 f x \cos (2 f x)-32 a b^3 f x \cos (2 f x)-16 a^2 b^2 f x \cos (4 e+2 f x)-32 a b^3 f x \cos (4 e+2 f x)-4 a^2 b^2 f x \cos (2 e+4 f x)-4 a^2 b^2 f x \cos (6 e+4 f x)+9 a^4 \sin (2 e)+15 a^3 b \sin (2 e)-18 a^2 b^2 \sin (2 e)-72 a b^3 \sin (2 e)-48 b^4 \sin (2 e)-9 a^4 \sin (2 f x)-13 a^3 b \sin (2 f x)+28 a^2 b^2 \sin (2 f x)+32 a b^3 \sin (2 f x)+3 a^4 \sin (4 e+2 f x)-a^3 b \sin (4 e+2 f x)-20 a^2 b^2 \sin (4 e+2 f x)-16 a b^3 \sin (4 e+2 f x)-3 a^4 \sin (2 e+4 f x)+3 a^3 b \sin (2 e+4 f x)+6 a^2 b^2 \sin (2 e+4 f x)\right )}{128 a^3 b^2 f \left (a+b \sec ^2(e+f x)\right )^3} \]
((-3*a^3 + a^2*b - 4*a*b^2 - 8*b^3)*(a + 2*b + a*Cos[2*e + 2*f*x])^3*Sec[e + f*x]^6*((ArcTan[Sec[f*x]*(Cos[2*e]/(2*Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b *Sin[4*e]]) - ((I/2)*Sin[2*e])/(Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*e] ]))*(-(a*Sin[f*x]) - 2*b*Sin[f*x] + a*Sin[2*e + f*x])]*Cos[2*e])/(64*a^3*b ^2*Sqrt[a + b]*f*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]]) - ((I/64)*ArcTan[Sec[f*x ]*(Cos[2*e]/(2*Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]]) - ((I/2)*Sin[2 *e])/(Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]]))*(-(a*Sin[f*x]) - 2*b*S in[f*x] + a*Sin[2*e + f*x])]*Sin[2*e])/(a^3*b^2*Sqrt[a + b]*f*Sqrt[b*Cos[4 *e] - I*b*Sin[4*e]])))/(a + b*Sec[e + f*x]^2)^3 + ((a + 2*b + a*Cos[2*e + 2*f*x])*Sec[2*e]*Sec[e + f*x]^6*(-24*a^2*b^2*f*x*Cos[2*e] - 64*a*b^3*f*x*C os[2*e] - 64*b^4*f*x*Cos[2*e] - 16*a^2*b^2*f*x*Cos[2*f*x] - 32*a*b^3*f*x*C os[2*f*x] - 16*a^2*b^2*f*x*Cos[4*e + 2*f*x] - 32*a*b^3*f*x*Cos[4*e + 2*f*x ] - 4*a^2*b^2*f*x*Cos[2*e + 4*f*x] - 4*a^2*b^2*f*x*Cos[6*e + 4*f*x] + 9*a^ 4*Sin[2*e] + 15*a^3*b*Sin[2*e] - 18*a^2*b^2*Sin[2*e] - 72*a*b^3*Sin[2*e] - 48*b^4*Sin[2*e] - 9*a^4*Sin[2*f*x] - 13*a^3*b*Sin[2*f*x] + 28*a^2*b^2*Sin [2*f*x] + 32*a*b^3*Sin[2*f*x] + 3*a^4*Sin[4*e + 2*f*x] - a^3*b*Sin[4*e + 2 *f*x] - 20*a^2*b^2*Sin[4*e + 2*f*x] - 16*a*b^3*Sin[4*e + 2*f*x] - 3*a^4*Si n[2*e + 4*f*x] + 3*a^3*b*Sin[2*e + 4*f*x] + 6*a^2*b^2*Sin[2*e + 4*f*x]))/( 128*a^3*b^2*f*(a + b*Sec[e + f*x]^2)^3)
Time = 0.44 (sec) , antiderivative size = 170, normalized size of antiderivative = 1.16, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.391, Rules used = {3042, 4629, 2075, 372, 440, 25, 397, 216, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\tan ^6(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan (e+f x)^6}{\left (a+b \sec (e+f x)^2\right )^3}dx\) |
\(\Big \downarrow \) 4629 |
\(\displaystyle \frac {\int \frac {\tan ^6(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (a+b \left (\tan ^2(e+f x)+1\right )\right )^3}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 2075 |
\(\displaystyle \frac {\int \frac {\tan ^6(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )^3}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 372 |
\(\displaystyle \frac {\frac {\int \frac {\tan ^2(e+f x) \left ((3 a-b) \tan ^2(e+f x)+3 (a+b)\right )}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )^2}d\tan (e+f x)}{4 a b}-\frac {(a+b) \tan ^3(e+f x)}{4 a b \left (a+b \tan ^2(e+f x)+b\right )^2}}{f}\) |
\(\Big \downarrow \) 440 |
\(\displaystyle \frac {\frac {-\frac {\int -\frac {\left (3 a^2-b a+4 b^2\right ) \tan ^2(e+f x)+(3 a-4 b) (a+b)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )}d\tan (e+f x)}{2 a b}-\frac {(3 a-4 b) (a+b) \tan (e+f x)}{2 a b \left (a+b \tan ^2(e+f x)+b\right )}}{4 a b}-\frac {(a+b) \tan ^3(e+f x)}{4 a b \left (a+b \tan ^2(e+f x)+b\right )^2}}{f}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {\frac {\int \frac {\left (3 a^2-b a+4 b^2\right ) \tan ^2(e+f x)+(3 a-4 b) (a+b)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )}d\tan (e+f x)}{2 a b}-\frac {(3 a-4 b) (a+b) \tan (e+f x)}{2 a b \left (a+b \tan ^2(e+f x)+b\right )}}{4 a b}-\frac {(a+b) \tan ^3(e+f x)}{4 a b \left (a+b \tan ^2(e+f x)+b\right )^2}}{f}\) |
\(\Big \downarrow \) 397 |
\(\displaystyle \frac {\frac {\frac {\frac {(a+b) \left (3 a^2-4 a b+8 b^2\right ) \int \frac {1}{b \tan ^2(e+f x)+a+b}d\tan (e+f x)}{a}-\frac {8 b^2 \int \frac {1}{\tan ^2(e+f x)+1}d\tan (e+f x)}{a}}{2 a b}-\frac {(3 a-4 b) (a+b) \tan (e+f x)}{2 a b \left (a+b \tan ^2(e+f x)+b\right )}}{4 a b}-\frac {(a+b) \tan ^3(e+f x)}{4 a b \left (a+b \tan ^2(e+f x)+b\right )^2}}{f}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {\frac {\frac {\frac {(a+b) \left (3 a^2-4 a b+8 b^2\right ) \int \frac {1}{b \tan ^2(e+f x)+a+b}d\tan (e+f x)}{a}-\frac {8 b^2 \arctan (\tan (e+f x))}{a}}{2 a b}-\frac {(3 a-4 b) (a+b) \tan (e+f x)}{2 a b \left (a+b \tan ^2(e+f x)+b\right )}}{4 a b}-\frac {(a+b) \tan ^3(e+f x)}{4 a b \left (a+b \tan ^2(e+f x)+b\right )^2}}{f}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\frac {\frac {\frac {\sqrt {a+b} \left (3 a^2-4 a b+8 b^2\right ) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{a \sqrt {b}}-\frac {8 b^2 \arctan (\tan (e+f x))}{a}}{2 a b}-\frac {(3 a-4 b) (a+b) \tan (e+f x)}{2 a b \left (a+b \tan ^2(e+f x)+b\right )}}{4 a b}-\frac {(a+b) \tan ^3(e+f x)}{4 a b \left (a+b \tan ^2(e+f x)+b\right )^2}}{f}\) |
(-1/4*((a + b)*Tan[e + f*x]^3)/(a*b*(a + b + b*Tan[e + f*x]^2)^2) + (((-8* b^2*ArcTan[Tan[e + f*x]])/a + (Sqrt[a + b]*(3*a^2 - 4*a*b + 8*b^2)*ArcTan[ (Sqrt[b]*Tan[e + f*x])/Sqrt[a + b]])/(a*Sqrt[b]))/(2*a*b) - ((3*a - 4*b)*( a + b)*Tan[e + f*x])/(2*a*b*(a + b + b*Tan[e + f*x]^2)))/(4*a*b))/f
3.4.69.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ ), x_Symbol] :> Simp[(-a)*e^3*(e*x)^(m - 3)*(a + b*x^2)^(p + 1)*((c + d*x^2 )^(q + 1)/(2*b*(b*c - a*d)*(p + 1))), x] + Simp[e^4/(2*b*(b*c - a*d)*(p + 1 )) Int[(e*x)^(m - 4)*(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[a*c*(m - 3) + (a*d*(m + 2*q - 1) + 2*b*c*(p + 1))*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && GtQ[m, 3] && IntBinomialQ[a , b, c, d, e, m, 2, p, q, x]
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ Symbol] :> Simp[(b*e - a*f)/(b*c - a*d) Int[1/(a + b*x^2), x], x] - Simp[ (d*e - c*f)/(b*c - a*d) Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e , f}, x]
Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ )*((e_) + (f_.)*(x_)^2), x_Symbol] :> Simp[g*(b*e - a*f)*(g*x)^(m - 1)*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(2*b*(b*c - a*d)*(p + 1))), x] - Simp[ g^2/(2*b*(b*c - a*d)*(p + 1)) Int[(g*x)^(m - 2)*(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[c*(b*e - a*f)*(m - 1) + (d*(b*e - a*f)*(m + 2*q + 1) - b*2*(c *f - d*e)*(p + 1))*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, q}, x] && LtQ[p, -1] && GtQ[m, 1]
Int[(u_)^(p_.)*(v_)^(q_.)*((e_.)*(x_))^(m_.), x_Symbol] :> Int[(e*x)^m*Expa ndToSum[u, x]^p*ExpandToSum[v, x]^q, x] /; FreeQ[{e, m, p, q}, x] && Binomi alQ[{u, v}, x] && EqQ[BinomialDegree[u, x] - BinomialDegree[v, x], 0] && ! BinomialMatchQ[{u, v}, x]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*((d_.)*tan[(e_.) + (f _.)*(x_)])^(m_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim p[ff/f Subst[Int[(d*ff*x)^m*((a + b*(1 + ff^2*x^2)^(n/2))^p/(1 + ff^2*x^2 )), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, d, e, f, m, p}, x] && Inte gerQ[n/2] && (IntegerQ[m/2] || EqQ[n, 2])
Time = 27.17 (sec) , antiderivative size = 134, normalized size of antiderivative = 0.91
method | result | size |
derivativedivides | \(\frac {\frac {\left (a +b \right ) \left (\frac {-\frac {a \left (5 a -4 b \right ) \tan \left (f x +e \right )^{3}}{8 b}-\frac {a \left (3 a^{2}-a b -4 b^{2}\right ) \tan \left (f x +e \right )}{8 b^{2}}}{\left (a +b +b \tan \left (f x +e \right )^{2}\right )^{2}}+\frac {\left (3 a^{2}-4 a b +8 b^{2}\right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {\left (a +b \right ) b}}\right )}{8 b^{2} \sqrt {\left (a +b \right ) b}}\right )}{a^{3}}-\frac {\arctan \left (\tan \left (f x +e \right )\right )}{a^{3}}}{f}\) | \(134\) |
default | \(\frac {\frac {\left (a +b \right ) \left (\frac {-\frac {a \left (5 a -4 b \right ) \tan \left (f x +e \right )^{3}}{8 b}-\frac {a \left (3 a^{2}-a b -4 b^{2}\right ) \tan \left (f x +e \right )}{8 b^{2}}}{\left (a +b +b \tan \left (f x +e \right )^{2}\right )^{2}}+\frac {\left (3 a^{2}-4 a b +8 b^{2}\right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {\left (a +b \right ) b}}\right )}{8 b^{2} \sqrt {\left (a +b \right ) b}}\right )}{a^{3}}-\frac {\arctan \left (\tan \left (f x +e \right )\right )}{a^{3}}}{f}\) | \(134\) |
risch | \(-\frac {x}{a^{3}}+\frac {i \left (-3 a^{4} {\mathrm e}^{6 i \left (f x +e \right )}+a^{3} b \,{\mathrm e}^{6 i \left (f x +e \right )}+20 a^{2} b^{2} {\mathrm e}^{6 i \left (f x +e \right )}+16 a \,b^{3} {\mathrm e}^{6 i \left (f x +e \right )}-9 a^{4} {\mathrm e}^{4 i \left (f x +e \right )}-15 a^{3} b \,{\mathrm e}^{4 i \left (f x +e \right )}+18 a^{2} b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+72 a \,b^{3} {\mathrm e}^{4 i \left (f x +e \right )}+48 b^{4} {\mathrm e}^{4 i \left (f x +e \right )}-9 \,{\mathrm e}^{2 i \left (f x +e \right )} a^{4}-13 a^{3} b \,{\mathrm e}^{2 i \left (f x +e \right )}+28 a^{2} b^{2} {\mathrm e}^{2 i \left (f x +e \right )}+32 a \,b^{3} {\mathrm e}^{2 i \left (f x +e \right )}-3 a^{4}+3 a^{3} b +6 a^{2} b^{2}\right )}{4 a^{3} b^{2} f \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+4 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a \right )^{2}}-\frac {3 \sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}+a +2 b}{a}\right )}{16 b^{3} f a}+\frac {\sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}+a +2 b}{a}\right )}{4 b^{2} f \,a^{2}}-\frac {\sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}+a +2 b}{a}\right )}{2 b f \,a^{3}}+\frac {3 \sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}-a -2 b}{a}\right )}{16 b^{3} f a}-\frac {\sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}-a -2 b}{a}\right )}{4 b^{2} f \,a^{2}}+\frac {\sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}-a -2 b}{a}\right )}{2 b f \,a^{3}}\) | \(584\) |
1/f*((a+b)/a^3*((-1/8*a*(5*a-4*b)/b*tan(f*x+e)^3-1/8*a*(3*a^2-a*b-4*b^2)/b ^2*tan(f*x+e))/(a+b+b*tan(f*x+e)^2)^2+1/8*(3*a^2-4*a*b+8*b^2)/b^2/((a+b)*b )^(1/2)*arctan(b*tan(f*x+e)/((a+b)*b)^(1/2)))-1/a^3*arctan(tan(f*x+e)))
Leaf count of result is larger than twice the leaf count of optimal. 293 vs. \(2 (133) = 266\).
Time = 0.30 (sec) , antiderivative size = 664, normalized size of antiderivative = 4.52 \[ \int \frac {\tan ^6(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\left [-\frac {32 \, a^{2} b^{2} f x \cos \left (f x + e\right )^{4} + 64 \, a b^{3} f x \cos \left (f x + e\right )^{2} + 32 \, b^{4} f x - {\left ({\left (3 \, a^{4} - 4 \, a^{3} b + 8 \, a^{2} b^{2}\right )} \cos \left (f x + e\right )^{4} + 3 \, a^{2} b^{2} - 4 \, a b^{3} + 8 \, b^{4} + 2 \, {\left (3 \, a^{3} b - 4 \, a^{2} b^{2} + 8 \, a b^{3}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {-\frac {a + b}{b}} \log \left (\frac {{\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (3 \, a b + 4 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - 4 \, {\left ({\left (a b + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{3} - b^{2} \cos \left (f x + e\right )\right )} \sqrt {-\frac {a + b}{b}} \sin \left (f x + e\right ) + b^{2}}{a^{2} \cos \left (f x + e\right )^{4} + 2 \, a b \cos \left (f x + e\right )^{2} + b^{2}}\right ) + 4 \, {\left (3 \, {\left (a^{4} - a^{3} b - 2 \, a^{2} b^{2}\right )} \cos \left (f x + e\right )^{3} + {\left (5 \, a^{3} b + a^{2} b^{2} - 4 \, a b^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{32 \, {\left (a^{5} b^{2} f \cos \left (f x + e\right )^{4} + 2 \, a^{4} b^{3} f \cos \left (f x + e\right )^{2} + a^{3} b^{4} f\right )}}, -\frac {16 \, a^{2} b^{2} f x \cos \left (f x + e\right )^{4} + 32 \, a b^{3} f x \cos \left (f x + e\right )^{2} + 16 \, b^{4} f x + {\left ({\left (3 \, a^{4} - 4 \, a^{3} b + 8 \, a^{2} b^{2}\right )} \cos \left (f x + e\right )^{4} + 3 \, a^{2} b^{2} - 4 \, a b^{3} + 8 \, b^{4} + 2 \, {\left (3 \, a^{3} b - 4 \, a^{2} b^{2} + 8 \, a b^{3}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {\frac {a + b}{b}} \arctan \left (\frac {{\left ({\left (a + 2 \, b\right )} \cos \left (f x + e\right )^{2} - b\right )} \sqrt {\frac {a + b}{b}}}{2 \, {\left (a + b\right )} \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right ) + 2 \, {\left (3 \, {\left (a^{4} - a^{3} b - 2 \, a^{2} b^{2}\right )} \cos \left (f x + e\right )^{3} + {\left (5 \, a^{3} b + a^{2} b^{2} - 4 \, a b^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{16 \, {\left (a^{5} b^{2} f \cos \left (f x + e\right )^{4} + 2 \, a^{4} b^{3} f \cos \left (f x + e\right )^{2} + a^{3} b^{4} f\right )}}\right ] \]
[-1/32*(32*a^2*b^2*f*x*cos(f*x + e)^4 + 64*a*b^3*f*x*cos(f*x + e)^2 + 32*b ^4*f*x - ((3*a^4 - 4*a^3*b + 8*a^2*b^2)*cos(f*x + e)^4 + 3*a^2*b^2 - 4*a*b ^3 + 8*b^4 + 2*(3*a^3*b - 4*a^2*b^2 + 8*a*b^3)*cos(f*x + e)^2)*sqrt(-(a + b)/b)*log(((a^2 + 8*a*b + 8*b^2)*cos(f*x + e)^4 - 2*(3*a*b + 4*b^2)*cos(f* x + e)^2 - 4*((a*b + 2*b^2)*cos(f*x + e)^3 - b^2*cos(f*x + e))*sqrt(-(a + b)/b)*sin(f*x + e) + b^2)/(a^2*cos(f*x + e)^4 + 2*a*b*cos(f*x + e)^2 + b^2 )) + 4*(3*(a^4 - a^3*b - 2*a^2*b^2)*cos(f*x + e)^3 + (5*a^3*b + a^2*b^2 - 4*a*b^3)*cos(f*x + e))*sin(f*x + e))/(a^5*b^2*f*cos(f*x + e)^4 + 2*a^4*b^3 *f*cos(f*x + e)^2 + a^3*b^4*f), -1/16*(16*a^2*b^2*f*x*cos(f*x + e)^4 + 32* a*b^3*f*x*cos(f*x + e)^2 + 16*b^4*f*x + ((3*a^4 - 4*a^3*b + 8*a^2*b^2)*cos (f*x + e)^4 + 3*a^2*b^2 - 4*a*b^3 + 8*b^4 + 2*(3*a^3*b - 4*a^2*b^2 + 8*a*b ^3)*cos(f*x + e)^2)*sqrt((a + b)/b)*arctan(1/2*((a + 2*b)*cos(f*x + e)^2 - b)*sqrt((a + b)/b)/((a + b)*cos(f*x + e)*sin(f*x + e))) + 2*(3*(a^4 - a^3 *b - 2*a^2*b^2)*cos(f*x + e)^3 + (5*a^3*b + a^2*b^2 - 4*a*b^3)*cos(f*x + e ))*sin(f*x + e))/(a^5*b^2*f*cos(f*x + e)^4 + 2*a^4*b^3*f*cos(f*x + e)^2 + a^3*b^4*f)]
\[ \int \frac {\tan ^6(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\int \frac {\tan ^{6}{\left (e + f x \right )}}{\left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{3}}\, dx \]
Time = 0.29 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.31 \[ \int \frac {\tan ^6(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=-\frac {\frac {{\left (5 \, a^{2} b + a b^{2} - 4 \, b^{3}\right )} \tan \left (f x + e\right )^{3} + {\left (3 \, a^{3} + 2 \, a^{2} b - 5 \, a b^{2} - 4 \, b^{3}\right )} \tan \left (f x + e\right )}{a^{2} b^{4} \tan \left (f x + e\right )^{4} + a^{4} b^{2} + 2 \, a^{3} b^{3} + a^{2} b^{4} + 2 \, {\left (a^{3} b^{3} + a^{2} b^{4}\right )} \tan \left (f x + e\right )^{2}} + \frac {8 \, {\left (f x + e\right )}}{a^{3}} - \frac {{\left (3 \, a^{3} - a^{2} b + 4 \, a b^{2} + 8 \, b^{3}\right )} \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {{\left (a + b\right )} b}}\right )}{\sqrt {{\left (a + b\right )} b} a^{3} b^{2}}}{8 \, f} \]
-1/8*(((5*a^2*b + a*b^2 - 4*b^3)*tan(f*x + e)^3 + (3*a^3 + 2*a^2*b - 5*a*b ^2 - 4*b^3)*tan(f*x + e))/(a^2*b^4*tan(f*x + e)^4 + a^4*b^2 + 2*a^3*b^3 + a^2*b^4 + 2*(a^3*b^3 + a^2*b^4)*tan(f*x + e)^2) + 8*(f*x + e)/a^3 - (3*a^3 - a^2*b + 4*a*b^2 + 8*b^3)*arctan(b*tan(f*x + e)/sqrt((a + b)*b))/(sqrt(( a + b)*b)*a^3*b^2))/f
Time = 2.54 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.36 \[ \int \frac {\tan ^6(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=-\frac {\frac {8 \, {\left (f x + e\right )}}{a^{3}} - \frac {{\left (3 \, a^{3} - a^{2} b + 4 \, a b^{2} + 8 \, b^{3}\right )} {\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b + b^{2}}}\right )\right )}}{\sqrt {a b + b^{2}} a^{3} b^{2}} + \frac {5 \, a^{2} b \tan \left (f x + e\right )^{3} + a b^{2} \tan \left (f x + e\right )^{3} - 4 \, b^{3} \tan \left (f x + e\right )^{3} + 3 \, a^{3} \tan \left (f x + e\right ) + 2 \, a^{2} b \tan \left (f x + e\right ) - 5 \, a b^{2} \tan \left (f x + e\right ) - 4 \, b^{3} \tan \left (f x + e\right )}{{\left (b \tan \left (f x + e\right )^{2} + a + b\right )}^{2} a^{2} b^{2}}}{8 \, f} \]
-1/8*(8*(f*x + e)/a^3 - (3*a^3 - a^2*b + 4*a*b^2 + 8*b^3)*(pi*floor((f*x + e)/pi + 1/2)*sgn(b) + arctan(b*tan(f*x + e)/sqrt(a*b + b^2)))/(sqrt(a*b + b^2)*a^3*b^2) + (5*a^2*b*tan(f*x + e)^3 + a*b^2*tan(f*x + e)^3 - 4*b^3*ta n(f*x + e)^3 + 3*a^3*tan(f*x + e) + 2*a^2*b*tan(f*x + e) - 5*a*b^2*tan(f*x + e) - 4*b^3*tan(f*x + e))/((b*tan(f*x + e)^2 + a + b)^2*a^2*b^2))/f
Time = 20.95 (sec) , antiderivative size = 615, normalized size of antiderivative = 4.18 \[ \int \frac {\tan ^6(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=-\frac {\mathrm {atan}\left (\frac {25\,\mathrm {tan}\left (e+f\,x\right )}{32\,\left (\frac {5\,b}{4\,a}-\frac {3\,a}{16\,b}+\frac {9\,a^2}{32\,b^2}+\frac {25}{32}\right )}-\frac {3\,\mathrm {tan}\left (e+f\,x\right )}{16\,\left (\frac {9\,a}{32\,b}+\frac {25\,b}{32\,a}+\frac {5\,b^2}{4\,a^2}-\frac {3}{16}\right )}+\frac {9\,\mathrm {tan}\left (e+f\,x\right )}{32\,\left (\frac {25\,b^2}{32\,a^2}-\frac {3\,b}{16\,a}+\frac {5\,b^3}{4\,a^3}+\frac {9}{32}\right )}+\frac {5\,\mathrm {tan}\left (e+f\,x\right )}{4\,\left (\frac {25\,a}{32\,b}-\frac {3\,a^2}{16\,b^2}+\frac {9\,a^3}{32\,b^3}+\frac {5}{4}\right )}\right )}{a^3\,f}-\frac {\frac {{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (5\,a^2+a\,b-4\,b^2\right )}{8\,a^2\,b}-\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (a+b\right )\,\left (-3\,a^2+a\,b+4\,b^2\right )}{8\,a^2\,b^2}}{f\,\left (2\,a\,b+a^2+b^2+{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (2\,b^2+2\,a\,b\right )+b^2\,{\mathrm {tan}\left (e+f\,x\right )}^4\right )}-\frac {\mathrm {atanh}\left (\frac {27\,\mathrm {tan}\left (e+f\,x\right )\,\sqrt {-b^6-a\,b^5}}{256\,\left (\frac {27\,a\,b^2}{256}-\frac {27\,b^3}{128}+\frac {171\,b^4}{256\,a}-\frac {7\,b^5}{64\,a^2}+\frac {5\,b^6}{32\,a^3}+\frac {5\,b^7}{4\,a^4}\right )}-\frac {81\,\mathrm {tan}\left (e+f\,x\right )\,\sqrt {-b^6-a\,b^5}}{256\,\left (\frac {27\,a^2\,b}{256}-\frac {27\,a\,b^2}{128}+\frac {171\,b^3}{256}-\frac {7\,b^4}{64\,a}+\frac {5\,b^5}{32\,a^2}+\frac {5\,b^6}{4\,a^3}\right )}-\frac {35\,\mathrm {tan}\left (e+f\,x\right )\,\sqrt {-b^6-a\,b^5}}{32\,\left (\frac {171\,a^2\,b}{256}-\frac {7\,a\,b^2}{64}-\frac {27\,a^3}{128}+\frac {5\,b^3}{32}+\frac {5\,b^4}{4\,a}+\frac {27\,a^4}{256\,b}\right )}+\frac {5\,\mathrm {tan}\left (e+f\,x\right )\,\sqrt {-b^6-a\,b^5}}{4\,\left (\frac {5\,a\,b^2}{32}-\frac {7\,a^2\,b}{64}+\frac {171\,a^3}{256}+\frac {5\,b^3}{4}-\frac {27\,a^4}{128\,b}+\frac {27\,a^5}{256\,b^2}\right )}+\frac {63\,\mathrm {tan}\left (e+f\,x\right )\,\sqrt {-b^6-a\,b^5}}{64\,\left (\frac {171\,a\,b^2}{256}-\frac {27\,a^2\,b}{128}+\frac {27\,a^3}{256}-\frac {7\,b^3}{64}+\frac {5\,b^4}{32\,a}+\frac {5\,b^5}{4\,a^2}\right )}\right )\,\sqrt {-b^5\,\left (a+b\right )}\,\left (3\,a^2-4\,a\,b+8\,b^2\right )}{8\,a^3\,b^5\,f} \]
- atan((25*tan(e + f*x))/(32*((5*b)/(4*a) - (3*a)/(16*b) + (9*a^2)/(32*b^2 ) + 25/32)) - (3*tan(e + f*x))/(16*((9*a)/(32*b) + (25*b)/(32*a) + (5*b^2) /(4*a^2) - 3/16)) + (9*tan(e + f*x))/(32*((25*b^2)/(32*a^2) - (3*b)/(16*a) + (5*b^3)/(4*a^3) + 9/32)) + (5*tan(e + f*x))/(4*((25*a)/(32*b) - (3*a^2) /(16*b^2) + (9*a^3)/(32*b^3) + 5/4)))/(a^3*f) - ((tan(e + f*x)^3*(a*b + 5* a^2 - 4*b^2))/(8*a^2*b) - (tan(e + f*x)*(a + b)*(a*b - 3*a^2 + 4*b^2))/(8* a^2*b^2))/(f*(2*a*b + a^2 + b^2 + tan(e + f*x)^2*(2*a*b + 2*b^2) + b^2*tan (e + f*x)^4)) - (atanh((27*tan(e + f*x)*(- a*b^5 - b^6)^(1/2))/(256*((27*a *b^2)/256 - (27*b^3)/128 + (171*b^4)/(256*a) - (7*b^5)/(64*a^2) + (5*b^6)/ (32*a^3) + (5*b^7)/(4*a^4))) - (81*tan(e + f*x)*(- a*b^5 - b^6)^(1/2))/(25 6*((27*a^2*b)/256 - (27*a*b^2)/128 + (171*b^3)/256 - (7*b^4)/(64*a) + (5*b ^5)/(32*a^2) + (5*b^6)/(4*a^3))) - (35*tan(e + f*x)*(- a*b^5 - b^6)^(1/2)) /(32*((171*a^2*b)/256 - (7*a*b^2)/64 - (27*a^3)/128 + (5*b^3)/32 + (5*b^4) /(4*a) + (27*a^4)/(256*b))) + (5*tan(e + f*x)*(- a*b^5 - b^6)^(1/2))/(4*(( 5*a*b^2)/32 - (7*a^2*b)/64 + (171*a^3)/256 + (5*b^3)/4 - (27*a^4)/(128*b) + (27*a^5)/(256*b^2))) + (63*tan(e + f*x)*(- a*b^5 - b^6)^(1/2))/(64*((171 *a*b^2)/256 - (27*a^2*b)/128 + (27*a^3)/256 - (7*b^3)/64 + (5*b^4)/(32*a) + (5*b^5)/(4*a^2))))*(-b^5*(a + b))^(1/2)*(3*a^2 - 4*a*b + 8*b^2))/(8*a^3* b^5*f)